<!--
 * @Author: @xiaonancheng
 * @Date: 2023-03-17 17:24:16
 * https://www.cnblogs.com/xiaonancheng
 * Copyright (c) 2023 by @xiaonancheng, All Rights Reserved. 
-->
{% extends "user_base.html" %}
{% block title %}
个人基本信息修改
{% endblock %}

{% block subtitle %}
个人基本信息修改
{% endblock %}


{% block main %}个人基本信息修改{% endblock %}

{% block content %}

<div class="card">
  <div class="card-body">
    <h5 class="card-title">个人基本信息修改</h5>

    <!-- Default Tabs -->
    <ul class="nav nav-tabs" id="myTab" role="tablist">
      <li class="nav-item" role="presentation">
        <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button"
          role="tab" aria-controls="home" aria-selected="true">基本信息</button>
      </li>
    </ul>

    <!-- 个人基本信息 -->
    <div class="tab-content pt-2" id="myTabContent" >
      <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
        <!-- Vertical Form -->
        <form class="row g-3" method="post" action="{% url 'UserApp:personal_add'%}">
          {% csrf_token %}
          <div class="col-md-12">
            <label for="user_name" class="form-label">姓名</label>
            <input type="text" class="form-control" id="user_name" name="user_name"  value="{{info.user_name}}">
          </div>
          <input type="hidden" value="info" name="type">
          <input type="hidden" name="id" value="{{info.infoid}}">

          <div class="col-md-12">
            <label for="user_age" class="form-label">年龄</label>
            <input type="text" class="form-control" id="user_age" name="user_age"  value="{{info.user_age}}">
          </div>

          <div class="col-md-12">
            <label for="inputState" class="form-label">性别</label>
            <select id="user_sex" class="form-select" name="user_sex"  >
              {% if info.user_sex  == '男' %}
              <option selected>男</option>
              <option>女</option>
              {% else %}
              <option >男</option>
              <option selected>女</option>
              {% endif %}
            </select>
          </div>

          <div class="col-md-12">
            <label for="user_height" class="form-label">身高(cm)</label>
            <input type="text" class="form-control" id="user_height" value="{{info.user_height}}" placeholder="如165" name="user_height">
          </div>
          <div class="col-md-12">
            <label for="user_weight" class="form-label">体重(kg)</label>
            <input type="text" class="form-control" id="user_weight" value="{{info.user_weight}}" placeholder="如55" name="user_weight">
          </div>

          <div class="col-12">
            <label for="allergy" class="form-label">药物过敏史</label>
            <!-- <input type="text"  id="modelCode" class="typeahead form-control" data-provide="typeahead"> -->
            <input type="text" class="form-control" id="allergy" value="{{info.allergy}}" placeholder="如青霉素、磺胺、链霉素等" name="allergy">
          </div>

          <div class="col-md-12">
            <label for="illness" class="form-label">疾病史</label>
            <input type="text" class="form-control" id="illness" value="{{info.illness}}" placeholder="如高血压、糖尿病、冠心病、慢性阻塞性肺疾病等" name="illness">
          </div>
          <div class="col-md-12">
            <label for="disability" class="form-label">残疾</label>
            <input type="text" class="form-control" id="disability" value="{{info.disability}}" placeholder="如视力残疾、听力残疾、言语残疾、肢体残疾等" name="disability">
          </div>

          <div class="col-md-12">
            <label for="common_drugs" class="form-label">常用药</label>
            <input type="text" class="form-control" id="common_drugs" value="{{info.common_drugs}}" name="common_drugs" placeholder="有请输入手术名称，没有输入无">
          </div>



          <div class="text-center">
            <button type="submit" class="btn btn-primary">提交</button>
            <button type="reset" class="btn btn-secondary">重置</button>
          </div>
        </form><!-- Vertical Form -->
      </div>


  </div>
</div>


{% endblock %}